<template lang="pug">
    <div class='gonggao'>
        <div class="homepage-content-container">
            <div id="homepage-content" class='homepage-content-container-html'>
                <h1>一切皆有可能</h1>
            </div>
        </div>
    </div>
</template>

<script>
export default {
    name: 'PscgoIndex',
}
</script>
<script setup>
import { onMounted } from 'vue';
// const htmlContent = ref('')



onMounted(() => {
    fetchAndDisplayHTML()
})
async function fetchAndDisplayHTML() {
    const contentElement = document.getElementById('homepage-content');
    const html = await window?.electron?.Home();
    console.log(html);
    // htmlContent.value = html
    // const html = api.Home();
    contentElement.innerHTML = html;
}
</script>
<style scoped>
.gonggao {
    /* position: absolute;
    top: calc(50% - 150px);
    left: 50%;
    transform: translate(-50%, -50%);
    width: 300px;
    height: 300px;
    border: 1px solid #ccc;
    padding: 8px; */
  height: 100%;
}
.homepage-content-container {
    display: flex;
    justify-content: center; /* 水平居中 */
    align-items: center;    /* 垂直居中 */
    height: 100%;          /* 让容器占满整个视口高度 */
} 
.homepage-content-container-html {
    padding: 0px;
    text-align: center; /* 文本居中 */
    overflow-y: hidden;
}
</style>